Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 5 - Menu Manager Reference / Menu Manager Functions
Initializing the Menu Manager /


InitContextualMenus

NEW WITH CONTEXTUAL MENUS

Adds the application to the system registry of contextual menu clients.

pascal OSStatus InitContextualMenus (void);
function result
A result code; see "Result Codes".
DISCUSSION
Your application should call the InitContextualMenus function early in your startup code to register your application as a contextual menu client. If you do not register your application, some system-level functions may respond as though your application does not use contextual menus. Not registering your application may also cause ProcessIsContextualMenuClient to return an incorrect value.

If you are a 68K application, you must pass the selector gestaltContextualMenuAttr to the Gestalt function before calling the InitContextualMenus function. If the Gestalt function returns a bit field with the gestaltContextualTrapAvailable bit set, InitContextualMenus can be called; see "Contextual Menu Gestalt Selector Constants".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998